<?php
	define('WEBAPP_ROOT', str_replace('webapp.inc.php', '', str_replace('\\', '/', __FILE__))); 
	

	switch($action){
		default:
			
			$data = $db->select("select * from ".DB_PRE."content order by updatetime desc limit 0,40");
			
			
			/*$movie = $db->select("select * from ".DB_PRE."movie order by updatetime desc limit 0,40");
			$app = $db->select("select * from ".DB_PRE."app order by updatetime desc limit 0,40");
			$tweet = $db->select("select * from ".DB_PRE."tweet order by updatetime desc limit 0,40");
			$wiki = $db->select("select * from ".DB_PRE."wiki order by updatetime desc limit 0,40");
			
			$data = array_merge($content,$movie,$wiki);
			
			// 对数组随机重新排列
			//shuffle($data);
			
			// 对数组按更新时间排序
			foreach($data as $key=>$val){
				
        		$temp[] = $val['updatetime'];
			}
			array_multisort($temp,SORT_DESC,$data);*/


			//dump($data);
			include template('index.html','webapp');
			
		break;
		
	}
?>